////////////////////////////////////////////////////////////////////////////////
//
//	This file is part of Woozox, see <http://code.google.com/p/woozox/>.
//
//	Copyright 2008-2009 Florian David
//
//	Woozoo is free software: you can redistribute it and/or modify
//	it under the terms of the GNU Lesser General Public License as 
//	published by the Free Software Foundation, either version 3 of 
//	the License, or (at your option) any later version.
//
//	Woozoo is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU Lesser General Public 
//	License along with Woozoo. If not, see <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
package org.woozoo.xhtml.unittests.selectorsuite.selector
{
	import org.flexunit.asserts.assertTrue;
	import org.woozoo.xhtml.unittests.selectorsuite.CaseOnly;

	public class OnlyChildCase extends CaseOnly
	{
		[Test(order=1)]
		public function findDivH2OnlyChild() : void {
			var res1 : Array = document.$$('div h2:only-child');
			var res2 : Array = document.$$('div h2:first-child:last-child');
			assertTrue(res1[0] == res2[0]);
		}		

		[Test(order=2)]
		public function findDivH2OnlyChild2() : void {
			results = document.$$('div pre:only-child');
			assertTrue(hasResultsAndLenEqual(0));
		}		

	}
}